package com.yc.yyds.servlet;

import com.yc.yyds.Bean.Message;
import com.yc.yyds.biz.BizException;
import com.yc.yyds.biz.SaveIndentBiz;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet(name = "PayServlet", value = "/PayServlet.s")
public class PayServlet extends HttpServlet {
    SaveIndentBiz biz = new SaveIndentBiz();
    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String indentid = request.getParameter("indentid");
        String money = request.getParameter("money");
        String moviename = request.getParameter("moviename");
        String payway = request.getParameter("payway");
        String userid = request.getParameter("userid");
        String ppjhid = request.getParameter("ppjhid");
        String num = request.getParameter("num");
        String balance = request.getParameter("balance");
         Message.indentid=indentid;
        Message.moviename=moviename;
        Message.money=money;
        try {
            biz.queren(userid,ppjhid,num,balance,money,indentid,payway);
          response.getWriter().append("成功");
        } catch (BizException e) {
            e.printStackTrace();
        }
    }

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }
}
